<!-- 退款审核页面 -->
<include file="Common:header" />
<TYimport plugin='datepicker' />
<TYimport plugin='Ueditor,swfUpload' public="true"/>
<div class="table_content" >
    <form action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}" id="upForm" method="post"  class="ajax_form">
        <table class="edit_table">
            <tr>
                <td class="tablehead">訂單號</td>
                <td>
                    <input type="text" name="ordersn" value="{$ordersn}" style="width: 200px;">&nbsp;<label class="tips">例：20170915907999</label>
                </td>
            </tr>
            <tr>
                <td class="tablehead">退款資金來源</td>
                <td>
                	<span class="radio">
                        <input type="radio" id="radio2" name="get_type" value="1" checked/><label for="radio2">未結算資金</label>
                        <input type="radio" id="radio3" name="get_type" value="2" /><label for="radio3">賬戶餘額</label>
                    </span>
                </td>
            </tr>
        </table>
        <div class="tab_box_btn">
            <input type="button" class="save_btn" value="申請退款" onclick="app_refund();" />
        </div>
    </form>
</div>
<script type="text/javascript">
function app_refund(){
	if ($('input[name=ordersn]').val() =='') {
		callBackTips(1, '請填寫訂單號',window.location.href);
        return false;
	}
	var formData = $('#upForm').serialize()
	$.ajax({
		url:"{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/refund_audit')}",
		type: 'POST',
        data : formData,
        async: false,
		dataType: 'json',
		success:function(data){
			if (data.status == 1){
    			callBackTips(data.status, data.info,"{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/refund_list')}");
    		}
			else{
    			callBackTips(data.status, data.info);
    		}
		}
	});
}
</script>
<include file="Common:footer" />
